Skip to content

adding response format samples #41944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: feature/azure-ai-agents/1.1.0b4
Choose a base branch
from

Conversation

M-Hietala
Copy link
Contributor

adding response format samples

with project_client:
agents_client = project_client.agents

# [START create_agent_with_json_schema_response_format]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot have these in many samples, because README samples may get broken

[START create_agent_with_json_schema_response_format]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove these if not needed in README

Copy link

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-ai-agents

run = agents_client.runs.create(thread_id=thread.id, agent_id=agent.id)

# Poll the run as long as run status is queued or in progress
while run.status in ["queued", "in_progress", "requires_action"]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: let us say

run = agents_client.runs.create_and_process(thread_id=thread.id, agent_id=agent.id)

message = agents_client.messages.create(thread_id=thread.id, role="user", content="Hello, give me a list of planets in our solar system.")
print(f"Created message, message ID: {message.id}")

run = agents_client.runs.create(thread_id=thread.id, agent_id=agent.id)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: let us say

run = agents_client.runs.create_and_process(thread_id=thread.id, agent_id=agent.id)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants